﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using BusinessLogic.Controller;
using DataAccess;
using DataEntity;

namespace BusinessLogic.Helper
{
    public class PropertyHelper
    {

        public static void BindBathrooms(DropDownList dd)
        {

            BindInterger(dd, 20);
        }

        public static void BindInterger(DropDownList dd, int lastNumber)
        {
            ListItem selectItem = new ListItem("Select", "0");
            dd.Items.Add(selectItem);
            for (int i = 1; i < lastNumber; i++)
            {
                ListItem newitem = new ListItem(i.ToString(), i.ToString());
                dd.Items.Add(newitem);

            }
        }

        public static void BindCity(DropDownList dd)
        {
            new CityController().BindCity(dd);
        }

        public static void BindLocality(DropDownList dd)
        {
            new LocalityController().BindLocality(dd);
        }

        public static void BindMeasurment(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            // dd.Items.Add(newItem);
            newItem = new ListItem("Sq.Ft.", "Sq.Ft.");
            dd.Items.Add(newItem);
            newItem = new ListItem("Sq. Meter", "Sq. Meter");
            dd.Items.Add(newItem);
            newItem = new ListItem("Sq. Yards", "Sq. Yards");
            dd.Items.Add(newItem);
            newItem = new ListItem("Grounds", "Grounds");
            dd.Items.Add(newItem);
            newItem = new ListItem("Aankadam", "Aankadam");
            dd.Items.Add(newItem);
            newItem = new ListItem("Rood", "Rood");
            dd.Items.Add(newItem);
            newItem = new ListItem("Chataks", "Chataks");
            dd.Items.Add(newItem);
            newItem = new ListItem("Perch", "Perch");
            dd.Items.Add(newItem);
            newItem = new ListItem("Guntha", "Guntha");
            dd.Items.Add(newItem);
            newItem = new ListItem("Ares", "Ares");
            dd.Items.Add(newItem);
            newItem = new ListItem("Biswa", "Biswa");
            dd.Items.Add(newItem);
            newItem = new ListItem("Acres", "Acres");
            dd.Items.Add(newItem);
            newItem = new ListItem("Bigha", "Bigha");
            dd.Items.Add(newItem);
            newItem = new ListItem("Kottah", "Kottah");
            dd.Items.Add(newItem);
            newItem = new ListItem("Hectares", "Hectares");
            dd.Items.Add(newItem);
            newItem = new ListItem("Marla", "Marla");
            dd.Items.Add(newItem);
            newItem = new ListItem("Kanal", "Kanal");
            dd.Items.Add(newItem);
            newItem = new ListItem("Cents", "Cents");

        }

        public static void BindFacing(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);
            newItem = new ListItem("North", "North");
            dd.Items.Add(newItem);
            newItem = new ListItem("South", "South");
            dd.Items.Add(newItem);
            newItem = new ListItem("East", "East");
            dd.Items.Add(newItem);
            newItem = new ListItem("West", "West");
            dd.Items.Add(newItem);
            newItem = new ListItem("North-East", "North-East");
            dd.Items.Add(newItem);
            newItem = new ListItem("North-West", "North-West");
            dd.Items.Add(newItem);
            newItem = new ListItem("South-East", "South-East");
            dd.Items.Add(newItem);
            newItem = new ListItem("South-West", "South-West");
            dd.Items.Add(newItem);

        }

        public static void BindPropertyonFloor(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);
            newItem = new ListItem("Basement", "Basement");
            dd.Items.Add(newItem);
            newItem = new ListItem("Lower Ground", "Lower Ground");
            dd.Items.Add(newItem);
            newItem = new ListItem("Ground", "Ground");
            for (int i = 1; i < 41; i++)
            {
                newItem = new ListItem(i.ToString(), i.ToString());
                dd.Items.Add(newItem);
            }
            dd.Items.Add(newItem);
            newItem = new ListItem("40+", "40+");
            dd.Items.Add(newItem);
            newItem = new ListItem("Multi-Storied", "Multi-Storied");

        }

        public static void BindTotalFloorsinconstruction(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);

            for (int i = 1; i < 41; i++)
            {
                newItem = new ListItem(i.ToString(), i.ToString());
                dd.Items.Add(newItem);
            }
            dd.Items.Add(newItem);
            newItem = new ListItem("40+", "40+");


        }

        public static void BindTypeofFlooring(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);

            dd.Items.Add(newItem);
            newItem = new ListItem("Marble", "Marble");
            dd.Items.Add(newItem);
            newItem = new ListItem("Granite", "Granite");
            dd.Items.Add(newItem);
            newItem = new ListItem("Ceramic", "Ceramic");
            dd.Items.Add(newItem);
            newItem = new ListItem("Mosaic", "Mosaic");
            dd.Items.Add(newItem);
            newItem = new ListItem("Cement", "Cement");
            dd.Items.Add(newItem);
            newItem = new ListItem("Stone", "Stone");
            dd.Items.Add(newItem);
            newItem = new ListItem("Vinyl", "Vinyl");
            dd.Items.Add(newItem);
            newItem = new ListItem("Wood", "Wood");
            dd.Items.Add(newItem);
            newItem = new ListItem("Vitrified", "Vitrified");
            dd.Items.Add(newItem);
            newItem = new ListItem("Spartex", "Spartex");
            dd.Items.Add(newItem);
            newItem = new ListItem("IPSFinish", "IPSFinish");
            dd.Items.Add(newItem);
            newItem = new ListItem("Others", "Others");



        }

        public static void BindFurnishing(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);


            newItem = new ListItem("Un Furnished", "Un Furnished");
            dd.Items.Add(newItem);
            newItem = new ListItem("Semi Furnished", "Semi Furnished");
            dd.Items.Add(newItem);
            newItem = new ListItem("Fully Furnished ", "Fully Furnished ");
            dd.Items.Add(newItem);
        }

        public static void BindBalcony(DropDownList dd)
        {
            ListItem newItem = new ListItem("Select", "0");
            dd.Items.Add(newItem);
            newItem = new ListItem("1", "1");
            dd.Items.Add(newItem);
            newItem = new ListItem("2", "2");
            dd.Items.Add(newItem);
            newItem = new ListItem("3", "3");
            dd.Items.Add(newItem);
            newItem = new ListItem("More than 3", "More than 3");
            dd.Items.Add(newItem);
        }

        public static void PropertyAdd(Property property, Address address, AreaDetail areaDetail, TransactionDetail transactionDetail, PropertyDescription propertyDescription)
        {
            new DataProvider().PropertyAdd(property, address, areaDetail, transactionDetail, propertyDescription);
        }

        public static void UpdatePropertywithAdditionalData(Guid propertyID, PropertyAditionalFeature propertyAditionalFeature, List<Guid> featureIDs, ProximityLandmark proximityLandmark)
        {
            new DataProvider().UpdatePropertywithAdditionalData(propertyID, propertyAditionalFeature, featureIDs, proximityLandmark);
        }

        public static void BindPriceMin(DropDownList dd)
        {
            ListItem newListItem = new ListItem("Min", "0"); dd.Items.Add(newListItem);            
            newListItem = new ListItem("Below 5 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("5 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("10 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("15 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("20 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("25 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("30 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("40 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("50 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("60 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("75 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("90 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("1 Crore"); dd.Items.Add(newListItem);
            newListItem = new ListItem("1.5 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("2 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("3 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("5 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("10 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("20 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("30 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("40 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("50 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("60 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("70 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("80 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("90 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("100 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("100+ Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("On Request"); dd.Items.Add(newListItem);

        }

        public static void BindWanTo(DropDownList dd)
        {
            ListItem newListItem = new ListItem("Select", "0"); dd.Items.Add(newListItem);
            newListItem = new ListItem("Rent"); dd.Items.Add(newListItem);
            newListItem = new ListItem("PG"); dd.Items.Add(newListItem);
            

        }

        public static void BindPriceMax(DropDownList dd)
        {
            ListItem newListItem = new ListItem("Max","0"); dd.Items.Add(newListItem);
            newListItem = new ListItem("Below 5 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("5 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("10 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("15 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("20 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("25 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("30 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("40 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("50 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("60 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("75 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("90 Lacs"); dd.Items.Add(newListItem);
            newListItem = new ListItem("1 Crore"); dd.Items.Add(newListItem);
            newListItem = new ListItem("1.5 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("2 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("3 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("5 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("10 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("20 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("30 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("40 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("50 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("60 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("70 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("80 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("90 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("100 Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("100+ Crores"); dd.Items.Add(newListItem);
            newListItem = new ListItem("On Request"); dd.Items.Add(newListItem);
													
        }
    }
}
